package xyz.eden.boot.common.web.support.adapter;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import xyz.eden.boot.common.web.result.HttpResult;
import xyz.eden.boot.common.web.support.adapter.req.PageQueryReq;
import xyz.eden.boot.common.web.support.adapter.res.PageInfoRes;
import xyz.eden.boot.common.web.support.application.base.PageService;

public interface PageController<Req extends PageQueryReq, Res extends PageInfoRes, QryBO, R> {


    default HttpResult<PageInfoRes<Res>> search(@RequestBody @Validated PageQueryReq req) {
        QryBO qryBO = this.builderQryBO((Req) req);
        PageService<QryBO, R> pageService = this.pageService();
        p

    }

    QryBO builderQryBO(Req req);

    /**
     * page service
     *
     * @return
     */
    PageService<QryBO, R> pageService();
}
